import React, { useRef, useState } from 'react';
import { PageContainer } from '@ant-design/pro-layout';
import DataTable from './components/DataTable';

const AdminIndex: React.FC = () => {
  // 表格
  let tableRef = useRef();

  return (
    <PageContainer title={false}>
      <DataTable
        mode={1}
        ref={tableRef}
        columns={['mark','name','sort','remark','created_at','operate']}
        operate={{
          //操作栏定义
          add:true,
          //操作列定义
          edit:true,
          delete:true,
          //多选定义
          mulChoice:{
            batchData:[],
            batchDelete:true,
            rowSelection:true,
            tableAlertRender:true,
            tableAlertOptionRender:true,
            batchChoice: false,
          },
          //单选定义
          oneChoice:false,
        }}
      />
    </PageContainer>
  );
};

export default AdminIndex;
